<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateDocumentsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('documents', function (Blueprint $table) {
            $table->increments('id')->comment('主键id');
            $table->string('documentname')->comment('文件名称');
            $table->string('filetype')->comment('文件类型');
            $table->unsignedInteger('showtype')->comment('文件展示类型，用于首页轮播图或者其他地方的展示图片类型区分');
            $table->string('path')->comment('文件存储路劲');
            $table->unsignedInteger('status')->comment('文件状态');
            $table->unsignedInteger('creator')->comment('创建用户的id');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('documents');
    }
}
